<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" type="text/css" href="/statics/css/nav.css" />
    <link rel="stylesheet" type="text/css" href="/statics/css/slider.css" />
    <link rel="stylesheet" type="text/css" href="/statics/css/style.css">
    <link rel="stylesheet" type="text/css" href="/css/style1.css"/>
    <script src="statics/js/jquery.min.js"></script>
    <title>小说目录</title>
    <style>

        .novel_chapter{
            width:100%;
            overflow: hidden;
        }
        .novel_chapter a{
            text-decoration: none;
        }
        .chapter_item{
            width:25%;
            float: left;
            text-align: left;
            list-style:none
        }
    </style>
</head>
<body>
    <!-- 头部 -->
    <?php
            include("../template/head.php");
        ?>
    <!-- 头部 -->
        
    <!--导航-->
        <?php
            include("../template/nav.php");
        ?>
    <!--导航-->
    <a href="../sx.html">返回作品</a>
    <div class="list_container">
        <ul class="novel_chapter" style="    max-width: 1200px;margin: 0 auto;">
        <?php
            $file_name="all.txt"; //测试用，可以去除
            if(isset($_GET['file_name'])){
                $file_name=$_GET['file_name'];
            }
            include("function.php");
            $data=get($file_name);
            foreach ($data as $key => $value ) {
                echo '<li class="chapter_item"><a href="m.php?file_name='.$file_name.'&page='.$key.'">第'.$value['num'].'章 '.$value['title'].'</a></li>';
            }
        ?>
        </ul>
    </div>
      <!-- 脚部 -->
      <?php
            include("../template/foot.php");
        ?>
    <!-- 脚部 -->
</body>
</html>